package com.xshang.controller;

import com.xshang.entity.TenantDs;
import com.xshang.service.TenantService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/tenant")
public class TenantController {

    @Resource
    private TenantService tenantService;

    @PostMapping("/save")
    public String saveTenant(@RequestBody TenantDs tenantDs) {
        tenantService.save(tenantDs);
        return "success";
    }
}
